#!/bin/bash

TTY2=/dev/ttyUSB0

while true
do
echo "dev=$TTY2"
if [ -c "$TTY2" ]; then
echo "$TTY2 is exist"
break
fi
echo "wait for $TTY2 ready, and check again after 1s"
sleep 1s
done

chmod 777 /dev/ttyUSB0
/home/share/uart/uart-imu 0 &

